<%@ page language="java"  pageEncoding="UTF-8"%>
<%-- <%@ taglib  uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> --%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="<%=request.getContextPath() %>/assets/lib/html5.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/assets/lib/respond.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/assets/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>订单管理列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>订单管理 <span class="c-gray en">&gt;</span> 待审核订单列表 <a id="btn-refresh" onclick="_refresh('getOrderManageList.action');" class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="text-c"> 
		订单时间段：
		<input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'start_date\')||\'%y-%M-%d\'}'})" id="start_date" class="input-text Wdate" style="width:120px;">
		-
		<input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'end_date\')}',maxDate:'%y-%M-%d'})" id="end_date" class="input-text Wdate" style="width:120px;">
		<input type="text" name="orderId" id="orderId" placeholder="订单号" style="width:120px;" class="input-text">
		<input type="text" name="passengerPhone" id="passengerPhone" placeholder="乘客电话" style="width:120px" class="input-text">
		<button name="search_btn" id="search_btn" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
	</div>
	 <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><!-- <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> --> </span>  </div> 
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr >
					<th width="25"><input type="checkbox" name="" value=""></th>
						<th>id标识</th>
						<th>手机号</th>
						<th>是否有效</th>
						<th>状态</th>
						<th>登录时间</th>
						<th>更新时间</th>
						<th>登录ip</th>
						<th>登录端口</th>
						<th>登录MAC</th>
						<th>登录IMEI</th>
						<th>登录IMSI</th>
						<th>登录经度</th>
						<th>登录纬度</th>
						<th>登录类型</th>
						<th>操作</th>
				</tr>
			</thead>
		</table>
	</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/layer/2.4/layer.js"></script>
<script type="text/javascript" src="<%=basePath%>static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="<%=basePath%>static/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath%>static/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="<%=basePath%>static/wyc/my.js"></script>
<script type="text/javascript">
var action_url="<%=request.getContextPath() %>/jsp/orderManage/";
var table;
table=$('.table-sort').dataTable({
	"ajax":{
			"url":action_url+"selectOrderManage.action",
			"data": function (d) {  
                d.start_date = $('#start_date').val();  
                d.end_date = $('#end_date').val();
                d.orderId = $('#orderId').val();
                d.passengerPhone=$('#passengerPhone').val();
			},
		}, 
	 columns: [
		{ data:
 			 function(obj){ return "<input type='checkbox'  value='"+obj.orderId+"' name='ck_orderId'>"; },
 			 /* class:'text-c', */
 		},
        { data: 'orderId' },
        { data: 'departTimeString' },
        { data: 'orderTimeString' },
        { data: 'departure' },
        { data: 'destination' },
        { data: 'passengerPhone' },
        { data: 'predictMoney' },
        { data: 'userType' },
        { data: 'predictDistance' },
        { data: 'predictTime' },
        { data: 'driverUserName' },
        { data: 'departTimeReal' },
        { data: 'departureReal' },
        { data: 'destinationReal' },
        { data: 'realMoney' },
        { data: 'realDistance' },
        { data: 'realTime' },
        { data: 'passengerNum' },
        { data: 'booker' },
        { data: function(obj){
        		if(obj.carType=='0'){return "公务轿车";}
        		if(obj.carType=='1'){return "商务七座";}
        		if(obj.carType=='2'){return "豪华轿车";}
        	},
    		'class':'td-status',
        },
        { data: 'passenger' },
        { data: function (obj) {
        	if(obj.orderState =='-1'){ return "未接单 ";}
        	if(obj.orderState =='1'){ return "等待接单 ";}
        	if(obj.orderState =='2'){ return "已接单 ";}
        	if(obj.orderState =='3'){ return "司机取消 ";}
        	if(obj.orderState =='4'){ return "乘客取消 ";}
        	if(obj.orderState =='5'){ return "<font color='#EE0000'>完成未支付</font>";}
        	if(obj.orderState =='6'){ return "<font color='#66CDAA'>完成已支付</font>";}
        	if(obj.orderState =='7'){ return "订单审核通过 ";}
        	if(obj.orderState =='8'){ return "订单审核未通过 ";}
        	if(obj.orderState =='9'){ return "开始服务  ";}
        	if(obj.orderState =='10'){ return "平台取消 ";}
        	},
    		'class':'td-status', 
        }, 
        { data:function(obj){
        		if(obj.invoiceState=='1'){return"已开票";}
        		if(obj.invoiceState=='2'){return "未开票";}
       		 },
     		'class':'td-status', 
			
		 },
        { data: function (obj) {
        			if(obj.orderState =='5' || obj.orderState =='6' || obj.orderState =='7' || obj.orderState =='8'){
        				return "<a name="+obj.orderId+" style='text-decoration:none' class='ml-5'  href='javascript:;' title='轨迹回放'><i class='Hui-iconfont'>轨迹回放</i></a>";
        			}
        			if(obj.orderState =='-1' || obj.orderState =='1' || obj.orderState =='2' || obj.orderState =='9'){
        				return "<a name="+obj.orderId+" style='text-decoration:none' class='ml-5'  href='javascript:;' title='取消订单'><i class='Hui-iconfont'>&#xe631;</i></a>";
        			}
        		},
        		'class':'td-status',
        }
    ],
	"processing": true,
    "serverSide": true,
    "bSort" : true,// 排序  
	"aoColumnDefs": [
	  {"orderable":false,"aTargets":[0]}// 不参与排序的列
	]
});

$(function() {
	$("table").on("click" ,".ml-5", function(){
		article_edit('轨迹回放','<%=basePath%>jsp/order/playback.action?orderId='+this.getAttribute("name") )
	});
	$("table").on("click" ,".ml-6", function(){
		orderAbolish('订单取消','<%=basePath%>jsp/order/orderAbolishview.action?orderId='+this.getAttribute("name"),450,350 )
	});
});
	function article_edit(title,url,id,w,h){
		var index = layer.open({
			type: 2,
			title: title,
			content: url
		});
		layer.full(index);
	}
</script> 
</body>
</html>
